package com.sjzl.action;

import java.io.IOException;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.sjzl.entity.Board;
import com.sjzl.service.BoardService;
import com.sjzl.service.UserService;
import com.sjzl.util.ShowMessageWindow;

@Component("boardAction")
@Scope("prototype")
public class BoardAction extends BaseAction {
	
	@Resource(name="boardServiceImpl")
	private BoardService boardService;
	
	@Resource(name="userServiceImpl")
	private UserService userService;

	private List<Board> boardList;
	public List<Board> getBoardList() {
		return boardList;
	}
	public void setBoardList(List<Board> boardList) {
		this.boardList = boardList;
	}
	
	public String list(){
		userService.checkLogin(request, response);
		boardList = boardService.list("from Board b where b.board = null");
		this.setTitle("设计之路IT技术社区论坛");
		return "board_list";
	}
	
}
